Generate Text (LLM) (Generative AI)
Synopsis
This operator generates text using large language model.Description
This operator uses the API from OpenAI to create a text from a prompt. The prompt you define in the operator is sent to OpenAI and the large language model is used to then create a text for you.In order to use this operator you have to provide an API key for openAI. This requires you to sign up on openai.com. You can then create a new key at https://platform.openai.com/account/api-keys. This can then be used to create a connection object.
This operator uses the completion API of OpenAI.
Input
- input (Connection)
An OpenAI connection object which contains your API key.
- doc
A document with the prompt to use. This is an alternative to the prompt operator.
Output
- doc
A document object with the answer to your prompt.
- con (Connection)
The connection object passed thru.
Parameters
- model The model to be used.
- prompt The prompt you would like to enter.
- max tokens Maximum number of tokens (length) of the input and output.